package cn.lingyangwl.agile.gateway.service;

import cn.lingyangwl.agile.gateway.model.*;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author shenguangyang
 */
@Service
public class StatisticService {
    @Resource
    private RabbitTemplate rabbitTemplate;

    public void sendMsg(StatisticBaseReq req) {
        rabbitTemplate.convertAndSend("statistic", req.getName(), req.toMessage());
    }
}
